// @ 表示的是 src 目录的绝对路径
import home from '@/views/home'
import journey from '@/views/journey'
import mine from '@/views/mine'
import travelPhoto from '@/views/travelPhoto'
import tabBar from '@/components/tab-bar'
import journeyTopBar from '@/components/journey-topbar'
/**
 * 路由配置
 */
const routes = [
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: '/home',
    components: {
      default: home,
      footer: tabBar,
    },
    meta: { // 路由元信息
      title: '首页',
      inTabBar: true,
      icon: '&#xe6cb;',
    },
  },
  {
    path: '/journey',
    components: {
      header: journeyTopBar,
      default: journey,
      footer: tabBar,
    },
    meta: {
      title: '行程',
      inTabBar: true,
      icon: '&#xe674;',
    },
  },
  {
    path: '/travelPhoto',
    components: {
      default: travelPhoto,
      footer: tabBar,
    },
    meta: {
      title: '旅拍',
      inTabBar: true,
      icon: '&#xe793;',
    },
  },
  {
    path: '/mine',
    components: {
      default: mine,
      footer: tabBar,
    },
    meta: {
      title: '我的',
      inTabBar: true,
      icon: '&#xe62f;',
    },
  },
]

export default routes
